package net.togogo.proxy;

public class HelloImplProxy implements IHello {

    //代理类实现业务类以及动态添加日志记录功能

    private IHello hello;

    public HelloImplProxy(IHello hello) {
        this.hello = hello;
    }

    @Override
    public void sayHello(String name) {
        System.out.println("============开始记录喝粥before===============");
        hello.sayHello(name);
        System.out.println("============开始记录喝粥after===============");
    }
}
